Opened 13 years ago

Closed 13 years ago

#1873 closed defect (fixed)

ST_InterpolatePoint returns empty M value

Reported by: arho Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.1
Component: postgis Version: 2.0.x
Keywords: Cc:

Description

If the interpolated point is directly on the line, M is 0:

Example - point not on line, correct M value: SELECT ST_InterpolatePoint('LINESTRING M (0 0 0, 10 0 20)', 'POINT(5 5)');

st_interpolatepoint


10

Example - point on line, M value is 0: SELECT ST_InterpolatePoint('LINESTRING M (0 0 0, 10 0 20)', 'POINT(5 0)');

st_interpolatepoint


0

Expected Result: 10

Version information: POSTGIS="2.0.0 r9605" GEOS="3.3.2-CAPI-1.7.2" PROJ="Rel. 4.7.1, 23 September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8" RASTER PostgreSQL 9.1.2 on i686-pc-linux-gnu, compiled by gcc-4.6.real (Debian 4.6.2-4) 4.6.2, 32-bit

Change History (2)

comment:1 by strk, 13 years ago

I shall notice that the lwgeom_interpolate_point doesn't have a unit test (and I confirm the bug)

comment:2 by pramsey, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in 2.0 at r9954 and in trunk.

Note: See TracTickets for help on using tickets.